﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using System.Data.SqlClient;
using Common;

namespace DAL
{
    public class ODSStgColumnsDAL : DB
    {
        public ODSStgColumnsDAL(LoginInfo info)
        {
            base.loginInfo = info;
        }   
        public bool Add(ODSStgColumns data, HIDB.dbo con)
        {
            bool result = true;
            try
            {
                //添加输入输出参数
                SqlParameter[] sqlparams =new SqlParameter[]
                { 
                     new SqlParameter("@GUID",data.GUID)
                    ,new SqlParameter("@Stg_ID",data.Stg_ID)
                    ,new SqlParameter("@ColumnName",data.ColumnName)
                };
                con.ExecuteSql("INSERT INTO [Working_db].[ODS_StgColumns]([GUID],Stg_ID,ColumnName) VALUES(@GUID,@Stg_ID,@ColumnName)", sqlparams);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return result;
        }
    }
}
